<template>
  <div><h1>商品表</h1>
  <van-field label="商品名" v-model="form.name"/>
  <van-field label="积分数" v-model="form.score"/>
  <van-button @click="post_goods">添加</van-button>



  </div>
</template>

<script>
import axios from 'axios'

export default {
  name: "goods",
  data() {
    return {
      form: {},

    }
  },
  methods: {
    post_goods(){
      axios.post('http://127.0.0.1:5000/post_goods',this.form)
      .then(res=>{
        alert('添加成功')
        console.log(res)
      })
    },

  },
  mounted() {

  }
}
</script>

<style scoped>

</style>
